/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package presenter;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import view.MenuPrincipalView;

/**
 *
 * @author jakson
 */
public class MenuPrincipalPresenter {
    private MenuPrincipalView view;

    public MenuPrincipalPresenter() {
        
        view = new MenuPrincipalView();
        
      
        view.getItemMenuImcInfantil().addActionListener(new ActionListener() {

            @Override
            public void actionPerformed(ActionEvent ae) {
                new CalculoIMCInfantilPresenter();
            }
        });
        view.getItemMenuIMCAdulto().addActionListener(new ActionListener() {

            @Override
            public void actionPerformed(ActionEvent ae) {
                new CalculoIMCAdultoPresenter();
            }
        });
        
        view.getItemMenuSair().addActionListener(new ActionListener() {

            @Override
            public void actionPerformed(ActionEvent ae) {
               view.dispose();
            }
        });
        
        view.setLocationRelativeTo(view);
        view.setVisible(true);
        
        
    }
    
    
}
